package com.ymatou.iapi.prod.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

public class GetProductSnapshotInfoCall extends YmatouBaseCall{
	
	private static String opurl = "api/prod/GetProductSnapshotInfo";

	public GetProductSnapshotInfoCall() {
		super(EnvSetup.getSystemUrl("prodiapi"), opurl, "GET", "PARAM");
	}

	@Override
	public void addDefHeader() {
		client.addHeader("Accept", "text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	}
	
	/**
	 * 获取Result
	 * 
	 * @return Result
	 */
	public JSONObject getResult() {
		JSONObject Data = null;
		try {
			JSONObject jo = new JSONObject(getReturnData());
			Data = jo.getJSONObject("result");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return Data;
	}
}
